<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
	<body>
		<s:form action="role">
			<table border="1">
				<tr>
					<td>
						<s:hidden name="role.id"/>
						<s:textfield name="teacher.name" label="教职工姓名" />
					</td>
					<td>
						<s:textfield name="teacher.uname" label="登录名" />
					</td>
				</tr>
				<tr>
					<td conspan="2" align="center">
						<s:submit value="查询" method="editTeachers" theme="simple" />
						<s:reset value="重置" theme="simple" />
						<s:submit value="新增" method="addTeacherToRole" theme="simple" />
					</td>
				</tr>
			</table>
			<table border="1">
				<tr>
					<td>
						教职工姓名
					</td>
					<td>
						登录名
					</td>
				</tr>
				<s:iterator value="teachers" id="teacher">
					<tr>
						<td>
							<s:property value="#teacher.name" />
						</td>
						<td>
							<s:property value="#teacher.uname" />
						</td>
						<td>
							<s:url id="url" action="role!removeTeacherFromRole">
								<s:param name="sid">
									<s:property value="#teacher.id" />
								</s:param>
							</s:url>
							<s:a href="%{url}">删除</s:a>
						</td>
					</tr>
				</s:iterator>
			</table>
		</s:form>
	</body>
</html>